<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/salesHold.do"/>
<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<SCRIPT language="JavaScript">

    function GetAllProducts()
    {
        newWindow = window.open('loadProducts.do','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=500,height=600,resizable=no');
  	newWindow.moveTo(300,30);
  	newWindow.focus();
    }

    function assignProduct(passedValue)
    {
	document.salesHoldForm.marketingPartNo.value = passedValue;
	window.focus();
    }

    function submitPage(action) {
        if(action == 'HOLD')
            document.salesHoldForm.action.value = "holdAllSalesOrders";
        else if(action == 'RELEASE')
            document.salesHoldForm.action.value = "releaseSalesOrders";

        document.salesHoldForm.productName.disabled = false;
        document.salesHoldForm.customerId.disabled = false;
        document.salesHoldForm.customerPO.disabled = false;

        document.salesHoldForm.submit();
    }

// SharatH on July 31, 2003
function showErrorReportPage()
{
    newWindow = window.open ('<%=chipTracContext%>/reportProblem.do','reportProblem','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=750,height=400,resizable=no');
    newWindow.focus();
}

</SCRIPT>



<!-- Top Header Start-->

<%@ include file="/jsp/includes/header.jsp" %>

<!-- Top Header End-->
  
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

	<%@ include file="/jsp/sales/sales_order_menu.jsp" %>

<!-- end of the side navigations -->
</TD>

<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->

<center><span class="NArialW">SalesOrder Details</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10>
<html:form name="salesHoldForm" method="post" action="/salesHold" type="com.scalar.chiptrack.sales.forms.SalesHoldForm">
 <table border="0" width="90%" align=right>
 
    <tr>
      <td width="25%"><font class="NArialL">Product Name(Marketing Part #)</font></td>
      <td width="15%"><font class="NArialL">
             	<html:text name="salesHoldForm" property="productName" disabled="true" styleClass="txfield"/></td>     
      <td width="10%" colspan=4>&nbsp;</td>
    </tr>
    <tr>
      <td width="25%"><font class="NArialL">Customer PO #</font></td>
      <td width="15%"><font class="NArialL"><html:text name="salesHoldForm"  property="customerPO" disabled="true" styleClass="txfield"/></td>
      <td width="10%">&nbsp;</td>
      <td width="15%"><font class="NArialL">Customer</font></td>
      <td width="15%"><font class="NArialL">
        <html:select name="salesHoldForm"  property="customerId" styleClass="txfield" disabled="true">
            <html:options collection="customersList" property="value" labelProperty="label"/>
        </html:select>     
      </td>
      <td width="10%">&nbsp;</td>
    </tr>
    <tr><td colsapn=6><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
    <logic:iterate id="LineItem" name="lineItemList"> 
    <tr>
      <td width="25%"><font class="NArialL">Customer PO #</font></td>
      <td width="15%"><font class="NArialL"><bean:write name="LineItem"  property="customerPO" /></td>
      <td width="10%">&nbsp;</td>
      <td width="15%"><font class="NArialL">SalesOrder Id</font></td>
      <td width="15%"><font class="NArialL">
        <bean:write name="LineItem" property="salesOrderId" />
      </td>
      <td width="10%">&nbsp;</td>
    </tr>    
    <tr>
      <td width="25%"><font class="NArialL">Customer Name</font></td>
      <td width="15%"><font class="NArialL"><bean:write name="LineItem"  property="customerName" /></td>
      <td width="10%">&nbsp;</td>
      <td width="15%"><font class="NArialL">Amount</font></td>
      <td width="15%"><font class="NArialL">
        <bean:write name="LineItem" property="amountAsString" />
      </td>
      <td width="10%">&nbsp;</td>
    </tr>    
    <tr>
      <td width="25%"><font class="NArialL">Req'd Dock Date</font></td>
      <td width="15%"><font class="NArialL"><bean:write name="LineItem"  property="requestDate" /></td>
      <td width="10%">&nbsp;</td>
      <td width="15%"><font class="NArialL">Schedule Date</font></td>
      <td width="15%"><font class="NArialL">
        <bean:write name="LineItem" property="scheduleDate" />
      </td>
      <td width="10%">&nbsp;</td>
    </tr>    
    <tr><td colspan=6><hr></td></tr>
    </logic:iterate>
    <tr><td colspan="6"><img height=10 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td></tr>
    <tr><td colspan="6">
        <logic:equal name="salesHoldForm" property="action" value="loadHoldSalesOrders">
            <a href="javascript:submitPage('HOLD');"><img src="<%=chipTracContext%>/jsp/includes/images/hold.gif" border=0></a>
        </logic:equal>
        <logic:equal name="salesHoldForm" property="action" value="loadReleaseSalesOrders">
            <a href="javascript:submitPage('RELEASE');"><img src="<%=chipTracContext%>/jsp/includes/images/release.gif" border=0></a>
        </logic:equal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="javascript:window.history.back();"><img src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" border=0></a>
    </td></tr>   
    
</table>

<input type="hidden" name="action" value="">
</html:form>

<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->

<%@ include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->

</BODY>
</HTML>
